Entry: Only open emoji picker on 2ndary icon click
authorDaniel Boles <dboles@src.gnome.org>
Mon, 28 Aug 2017 19:26:48 +0000 (20:26 +0100)
committerDaniel Boles <dboles@src.gnome.org>
Mon, 28 Aug 2017 19:52:01 +0000 (20:52 +0100)
We hijack the secondary icon for the emoji picker, but the handler for
::icon-press did not check the pressed icon and opened it for either.

https://bugzilla.gnome.org/show_bug.cgi?id=786938

gtk/gtkentry.c

index 26fd08dc281a8d6b1980953ba677f80e4fd2922a..840a9cbdc56b39e2f36c1e8e679e6e2a0fc8182d 100644 (file)
@@ -9858,7 +9858,8 @@ pick_emoji (GtkEntry *entry,
             GdkEvent *event,
             gpointer  data)
 {
-  gtk_entry_choose_emoji (entry);
+  if (icon == GTK_ENTRY_ICON_SECONDARY)
+    gtk_entry_choose_emoji (entry);
 }
 
 static void